package com.ruoyi.honors.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.honors.mapper.JwTeachHonorsMapper;
import com.ruoyi.honors.domain.JwTeachHonors;
import com.ruoyi.honors.service.IJwTeachHonorsService;

/**
 * 学院荣誉Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JwTeachHonorsServiceImpl implements IJwTeachHonorsService 
{
    @Autowired
    private JwTeachHonorsMapper jwTeachHonorsMapper;

    /**
     * 查询学院荣誉
     * 
     * @param thId 学院荣誉主键
     * @return 学院荣誉
     */
    @Override
    public JwTeachHonors selectJwTeachHonorsByThId(Long thId)
    {
        return jwTeachHonorsMapper.selectJwTeachHonorsByThId(thId);
    }

    /**
     * 查询学院荣誉列表
     * 
     * @param jwTeachHonors 学院荣誉
     * @return 学院荣誉
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JwTeachHonors> selectJwTeachHonorsList(JwTeachHonors jwTeachHonors)
    {
        return jwTeachHonorsMapper.selectJwTeachHonorsList(jwTeachHonors);
    }

    /**
     * 查询学院荣誉列表
     * 
     * @param jwTeachHonors 学院荣誉
     * @return 学院荣誉
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "d")
    public List<JwTeachHonors> selectAllJwTeachHonors(JwTeachHonors jwTeachHonors) {
        return jwTeachHonorsMapper.selectAllJwTeachHonors(jwTeachHonors);
    }

    /**
     * 新增学院荣誉
     * 
     * @param jwTeachHonors 学院荣誉
     * @return 结果
     */
    @Override
    public int insertJwTeachHonors(JwTeachHonors jwTeachHonors)
    {
        return jwTeachHonorsMapper.insertJwTeachHonors(jwTeachHonors);
    }

    /**
     * 修改学院荣誉
     * 
     * @param jwTeachHonors 学院荣誉
     * @return 结果
     */
    @Override
    public int updateJwTeachHonors(JwTeachHonors jwTeachHonors)
    {
        jwTeachHonors.setUpdateTime(DateUtils.getNowDate());
        return jwTeachHonorsMapper.updateJwTeachHonors(jwTeachHonors);
    }

    /**
     * 批量删除学院荣誉
     * 
     * @param thIds 需要删除的学院荣誉主键
     * @return 结果
     */
    @Override
    public int deleteJwTeachHonorsByThIds(Long[] thIds)
    {
        return jwTeachHonorsMapper.deleteJwTeachHonorsByThIds(thIds);
    }

    /**
     * 删除学院荣誉信息
     * 
     * @param thId 学院荣誉主键
     * @return 结果
     */
    @Override
    public int deleteJwTeachHonorsByThId(Long thId)
    {
        return jwTeachHonorsMapper.deleteJwTeachHonorsByThId(thId);
    }
}
